/**
 * textareabox component
 * @author FengKangshuying
 */
import { Component, Input, Output, OnInit, EventEmitter, ViewContainerRef , ChangeDetectionStrategy } from '@angular/core';
import { FormControl } from '@angular/forms';

@Component({
    selector: 'wf-form-textareabox',
    templateUrl: './template.textareabox.html',
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class TextareaboxComponent implements OnInit {
    @Input() label: string;
    @Input() labelIcon: string;
    @Input() col: number;
    @Input() cols: number;
    @Input() rows: number;
    @Input() placeholder: string;
    @Input() control: FormControl = new FormControl();
    @Output() modelChange: EventEmitter<string | number> = new EventEmitter<string | number>();

    constructor(private viewRef: ViewContainerRef) {
        //console.log(viewRef.element.nativeElement);
    }
    /**
     * 设置表单元素class
     */
    get class() {
        return `form-group col-sm-${12 / this.col}`;
    }
    ngOnInit() {

    }
}

